<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

   <f:view>
      <h:head>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
         <title><ui:insert name="title"/> - #{msg.title_project}</title>
         <link href="#{request.contextPath}/resources/css/blog.css" rel="stylesheet" type="text/css"/>
         <link href="#{request.contextPath}/resources/css/theme.css" rel="stylesheet" type="text/css"/>
         <ui:insert name="head"/>
         <link title="Home" href="#{sess.baseUrl}" rel="start"/>
      </h:head>

      <h:body styleClass="mt-main-index layout-wt">

         <div id="container">
            <div id="container-inner">

               <div id="header">
                  <div id="header-inner">
                     <div id="header-content">
                        <h1 id="header-name"><a href="#{sess.baseUrl}" tabindex="90">#{msg.text_website}</a></h1>
                        <div>
                           <h2 id="header-description" style="float:left;">#{msg.text_description}</h2>
                           <a href="#{request.contextPath}/mon/mem.jsp" target="_blank" style="float:right;">&nbsp;Mem&nbsp;</a>
                           <a href="#{request.contextPath}/mon/ses.jsp" target="_blank" style="float:right;">&nbsp;Ses&nbsp;</a>
                           <br style="clear:both"/>
                        </div>
                        <div id="header-menu">
                           <div id="header-search">
                              <form method="post" action="#{request.contextPath}/search" >
                                 <input id="search-text" class="input-text" name="searchtext" value="" tabindex="60"/>
                                 <input type="submit" class="button" name="search" value="#{msg.action_search}" tabindex="61"/>
                              </form>
                           </div>
                           <h:panelGroup layout="block" rendered="#{auth.authenticated}">
                              <ul id="header-menu-right">
                                 <li><a href="#{request.contextPath}/user/logout" tabindex="51">#{msg.action_logout}</a></li>
                                 <li><a href="#{request.contextPath}/user/profile" tabindex="52">#{msg.action_userprofile}</a></li>
                              </ul>
                           </h:panelGroup>
                           <h:panelGroup layout="block" rendered="#{!auth.authenticated}">
                              <ul id="header-menu-right">
                                 <li><a href="#{request.contextPath}/user/login" tabindex="51">#{msg.action_login}</a></li>
                                 <li><a href="#{request.contextPath}/user/register" tabindex="52">#{msg.action_register}</a></li>
                              </ul>
                           </h:panelGroup>
                           <ul id="header-menu-left">
                              <li><a href="#{request.contextPath}/" tabindex="91">#{msg.action_home}</a></li>
                              <li><a href="#{request.contextPath}/archives" tabindex="50">#{msg.action_archives}</a></li>
                           </ul>
                        </div>
                     </div>
                  </div>
               </div>

               <div id="content">
                  <div id="content-inner">

                     <div id="alpha">
                        <div id="alpha-inner">
                           <div id="page-content">
                              <ui:insert name="content"/>
                           </div>
                        </div>
                     </div>

                     <div id="beta">
                        <div id="beta-inner">
                           <h:panelGroup styleClass="widget-admin widget" layout="block" rendered="#{auth.userRole.adminRight}">
                              <h3 class="widget-header">#{msg.widget_admin_title}</h3>
                              <div class="widget-content">
                                 <a href="#{request.contextPath}/admin/user">#{msg.action_admin_user}</a>
                                 <a href="#{request.contextPath}/admin/categories">#{msg.action_admin_categories}</a>
                                 <a href="#{request.contextPath}/admin/postings">#{msg.action_admin_postings}</a>
                              </div>
                           </h:panelGroup>

                           <div class="widget-archive widget-archive-category widget">
                              <h3 class="widget-header">#{msg.widget_categories_title}</h3>
                              <div class="widget-content">
                                 Categories todo
                              </div>
                           </div>

                           <div class="widget-archive widget-archive-monthly widget">
                              <h3 class="widget-header"><a href="#{request.contextPath}/archives">#{msg.widget_monthly_archives_title}</a></h3>
                              <div class="widget-content">
                                 Archives todo
                              </div>
                           </div>

                           <div class="widget-auth widget">
                              <h3 class="widget-header">#{msg.widget_user_title}</h3>
                              <h:panelGroup id="widget-content-loggedout" styleClass="widget-content" layout="block" rendered="#{!auth.authenticated}">
                                 <h:form id="widget-loginform" prependId="false">
                                    <div class="field">
                                       <h:outputLabel styleClass="field-label" value="#{msg.field_username}:" for="widget-username"/>
                                       <div class="field-content">
                                          <h:inputText id="widget-username" styleClass="input-text" value="#{auth.userName}" tabindex="70"/>
                                       </div>
                                    </div>
                                    <div class="field">
                                       <h:outputLabel styleClass="field-label" value="#{msg.field_password}:" for="widget-password"/>
                                       <div class="field-content">
                                          <h:inputSecret id="widget-password" styleClass="input-text input-password" value="#{auth.passWord}" tabindex="71"/>
                                       </div>
                                    </div>
                                    <h:commandButton id="widget-login-button" styleClass="button" action="#{auth.logInAction}" value="#{msg.action_login}" tabindex="72"/>
                                 </h:form>
                              </h:panelGroup>
                              <h:panelGroup id="widget-content-loggedin" styleClass="widget-content" layout="block" rendered="#{auth.authenticated}">
                                 <p>#{msg.text_loggedin_as}
                                    <h:outputLink value="#{request.contextPath}/user/profile" >
                                       <h:outputText value="#{auth.userName}" title="#{msg.tip_profile}"/>
                                    </h:outputLink>
                                 </p>
                                 <h:form id="widget-logoutform" prependId="false">
                                    <h:commandButton id="widget-logout-button" styleClass="button" action="#{auth.logOutAction}" value="#{msg.action_logout}"/>
                                 </h:form>
                              </h:panelGroup>
                           </div>

                        </div>
                     </div>

                  </div>
               </div>

               <div id="footer">
                  <div id="footer-inner">
                     <div id="footer-content">
                        <div class="widget-powered widget">
                           <div class="widget-content">#{msg.text_poweredby}</div>
                        </div>
                        <div class="widget-creative-commons widget">
                           <div class="widget-content">
                              #{msg.text_license_pre} <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en">#{msg.text_license_type}</a>.
                           </div>
                        </div>
                     </div>
                  </div>
               </div>

            </div>
         </div>
      </h:body>
   </f:view>
</html>
